def is_sorted(x):
    for i in range(len(x)-1):
        if x[i]>x[i+1]:
            return False
    return True
x=[1,2,3,4,5]
print(is_sorted(x))
y=[1,2,1,4]
print(is_sorted(y))

